<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <link href="./resources/css/default.css" rel="stylesheet" type="text/css" />
        <link href="./resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
        <title>TODO supply a title</title>
    </head>
    <body>
        <ui:composition template="/template.xhtml">
           <ui:define name="left">
               <h:form id="menu">
                   <h:commandLink action="/index" value="Menu"/>
               </h:form>
           </ui:define>
           <ui:define name="content">
               <h:form id="fomulario">
                   <h:panelGrid columns="2">
                       <h:outputText id="labelFecha" value="Fecha Evento"/>
                       <h:inputText id="campoNombrePersona" value="#{eventoAction.fecha}"
                                     required="true" requiredMessage="El valor es obligatorio"/>
                       <h:outputText id="labelDescipcion" value="Descipcion"/>
                       <h:inputTextarea id="campoDesc" value="#{eventoAction.evento.descripcion}"
                                     required="true" requiredMessage="El valor es obligatorio"/>
                       <h:outputText id="labelLugar" value="Lugar"/>
                       <h:inputTextarea id="campoLugar" value="#{eventoAction.evento.lugar}"
                                     required="true" requiredMessage="El valor es obligatorio"/>
                       <h:outputText value="Persona"/>
                       <h:selectOneMenu value="#{eventoAction.personaSeleccionada}"
                                        converter="com.uam.soi.converter.PersonaConverter">
                           <f:selectItems value="#{eventoAction.listaPersonas}"></f:selectItems>
                       </h:selectOneMenu>
                   </h:panelGrid>
                   <h:panelGrid columns="1">
                       <h:commandButton action="#{eventoAction.guardarEvento}" value="Guardar"/>
                   </h:panelGrid>
                   
                </h:form>
           </ui:define>
       </ui:composition>
    </body>
</html>
